package com.dt.global.web.mar.Newscentrality.impl;

import java.util.List;

import javax.annotation.Resource;

import org.hibernate.HibernateException;
import org.springframework.stereotype.Service;

import com.dt.components.exhibernate.mgr.HibernateMgrImpl;
import com.dt.global.entitys.bo.TWebCoreArticle;
import com.dt.global.entitys.bo.TWebCoreChannel;
import com.dt.global.web.dao.Newscentrality.NewscentralityDao;
import com.dt.global.web.mar.Newscentrality.NewscentralityMar;

/**
 * 首页新闻查询的实现类
 * @author MWG
 *
 */
@SuppressWarnings("rawtypes")
@Service
public class NewscentralityMarImpl extends HibernateMgrImpl implements NewscentralityMar{
	
	@Resource
    private NewscentralityDao newscentrality;
	
	public List<TWebCoreChannel> getTWebCoreChannelPid(String pid)
			throws HibernateException {
		try {
			return newscentrality.getTWebCoreChannelPid(pid);
		} catch (HibernateException e) {
			e.printStackTrace();
			return null;
		}
	}
	public TWebCoreChannel getTWebCoreChannelId(String ChannelId)
			throws HibernateException {
		try {
			return newscentrality.getTWebCoreChannelId(ChannelId);
		} catch (HibernateException e) {
			e.printStackTrace();
			return null;
		}
	}
	public List<TWebCoreArticle> getTWebCoreArticle(String ChannelId)
			throws HibernateException {
		try {
			return newscentrality.getTWebCoreArticle(ChannelId);
		} catch (HibernateException e) {
			e.printStackTrace();
			return null;
		}
	}
	public List<TWebCoreChannel> getTWebCoreChannelNid(String nid)
			throws HibernateException {
		try {
			return newscentrality.getTWebCoreChannelNid(nid);
		} catch (HibernateException e) {
			e.printStackTrace();
			return null;
		}
	}
	public List<String> getTWebCoreChannelGroupByNid(String pid)
			throws HibernateException {
		try {
			return newscentrality.getTWebCoreChannelGroupByNid(pid);
		} catch (HibernateException e) {
			e.printStackTrace();
			return null;
		}
	}

}
